import request from '@/utils/request'

// 查询APP访问记录列表
export function listAppAccessLog(query) {
  return request({
    url: '/app/appAccessLog/list',
    method: 'get',
    params: query
  })
}

// 查询APP访问记录详细
export function getAppAccessLog(id) {
  return request({
    url: '/app/appAccessLog/' + id,
    method: 'get'
  })
}

// 新增APP访问记录
export function addAppAccessLog(data) {
  return request({
    url: '/app/appAccessLog',
    method: 'post',
    data: data
  })
}

// 修改APP访问记录
export function updateAppAccessLog(data) {
  return request({
    url: '/app/appAccessLog',
    method: 'put',
    data: data
  })
}

// 删除APP访问记录
export function delAppAccessLog(id) {
  return request({
    url: '/app/appAccessLog/' + id,
    method: 'delete'
  })
}

export function statisticsBarList(beginTime, endTime, level) {
  return request({
    url: '/app/appAccessLog/statisticsBarList?beginTime=' + beginTime+'&endTime='+endTime+'&level='+level,
    method: 'get'
  })
}

export function statisticsBarSight(beginTime, endTime) {
  return request({
    url: '/app/appAccessLog/statisticsBarSight?beginTime=' + beginTime+'&endTime='+endTime,
    method: 'get'
  })
}

export function statisticsBarNotice(beginTime, endTime) {
  return request({
    url: '/app/appAccessLog/statisticsBarNotice?beginTime=' + beginTime+'&endTime='+endTime,
    method: 'get'
  })
}

export function statisticsBarCylinderScreen(beginTime, endTime){
  return request({
    url: '/app/appAccessLog/statisticsBarCylinderScreen?beginTime=' + beginTime+'&endTime='+endTime,
    method: 'get'
  })
}
